package com.ming.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: tangC
 * @Date: 2020/7/9 16:42
 * @Description:
 */
@Component
public class Reflush {

    @Value("${server.port}")
    private Integer port;

    public void reflush(){
        RestTemplate restTemplate = new RestTemplate();
        restTemplate.getForObject("loacalhost:"+port+"/"+"actuator/refresh",Object.class);
    }
}
